<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Superpixel Benchmark: lib_eval/transformation.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Superpixel Benchmark
   </div>
   <div id="projectbrief">Superpixel benchmark, tools and algorithms.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f07c7e2e21621c6454ef07b472f6f1ef.html">lib_eval</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">transformation.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="transformation_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#ifndef TRANSFORMATIONS_H</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#define TRANSFORMATIONS_H</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;opencv2/opencv.hpp&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classTransformation.html">   40</a></span>&#160;<span class="keyword">class </span><a class="code" href="classTransformation.html">Transformation</a> {</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a960fca6389507a4dddd54fc51ecb2dbe">applyGaussianAdditiveNoise</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">float</span> variance, </div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            cv::Mat &amp;noisy_image);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a2f7e3614b6d159825bc39f33367a8c47">applyGaussianSamplingErrors</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">float</span> variance, </div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            cv::Mat &amp;noisy_image);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    </div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a1feaf4e4c77f3fc0786181bef5f31674">applySaltAndPepperNoise</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">float</span> p, cv::Mat &amp;noisy_image);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    </div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#ac08f5ac7e3c9f3f050a8de33e6c463c6">applyPoissonNoise</a>(<span class="keyword">const</span> cv::Mat &amp;image, cv::Mat &amp;noisy_image);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    </div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#ae21c758d35bd36db968aef32325bb877">applyBlur</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> size, cv::Mat &amp;blurred_image);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a34ca4d06b735987696527bddf11e675d">applyGaussianBlur</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> size, <span class="keywordtype">float</span> sigma_x, </div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            <span class="keywordtype">float</span> sigma_y, cv::Mat &amp;blurred_image);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a54b67208b52267e70c1c3a83122e2f79">applyMedianBlur</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> size, </div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            cv::Mat &amp;blurred_image);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a2d4c1c435f84810901c2177d36fa11b7">applyBilateralFilter</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> size, <span class="keywordtype">float</span> sigma_color, </div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            <span class="keywordtype">float</span> sigma_space, cv::Mat &amp;filtered_image);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    </div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a3cf1af7736867a7e9f056dec13f1ac56">applyMotionBlur</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> size, </div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keywordtype">float</span> angle, cv::Mat &amp;blurred_image);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#a850d04c10ed94bb8d7c82e3fe41e22f1">applyVerticalShear</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> crop, </div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="keywordtype">float</span> shear, cv::Mat &amp;sheared_image);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#aa313a9c5b15baafeabc62c9091d84d89">applyHorizontalShear</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> crop, </div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordtype">float</span> shear, cv::Mat &amp;sheared_image);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#aee52c484fe1ec194a97f7ce82ba0508f">applyRotation</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> crop, <span class="keywordtype">float</span> angle, </div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            cv::Mat &amp;rotated_image, <span class="keywordtype">int</span> interpolation = cv::INTER_LINEAR);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTransformation.html#ae51215c44b8a132a2da0eee215691c99">applyTranslation</a>(<span class="keyword">const</span> cv::Mat &amp;image, <span class="keywordtype">int</span> crop, </div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            <span class="keywordtype">int</span> translation_x, <span class="keywordtype">int</span> translation_y, cv::Mat &amp;translated_image);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;};</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="preprocessor">#endif  </span><span class="comment">/* TRANSFORMATIONS_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="ttc" id="classTransformation_html_ae21c758d35bd36db968aef32325bb877"><div class="ttname"><a href="classTransformation.html#ae21c758d35bd36db968aef32325bb877">Transformation::applyBlur</a></div><div class="ttdeci">static void applyBlur(const cv::Mat &amp;image, int size, cv::Mat &amp;blurred_image)</div><div class="ttdoc">Apply blur (box filter). </div><div class="ttdef"><b>Definition:</b> transformation.cpp:180</div></div>
<div class="ttc" id="classTransformation_html_aee52c484fe1ec194a97f7ce82ba0508f"><div class="ttname"><a href="classTransformation.html#aee52c484fe1ec194a97f7ce82ba0508f">Transformation::applyRotation</a></div><div class="ttdeci">static void applyRotation(const cv::Mat &amp;image, int crop, float angle, cv::Mat &amp;rotated_image, int interpolation=cv::INTER_LINEAR)</div><div class="ttdoc">Apply rotation. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:312</div></div>
<div class="ttc" id="classTransformation_html_a960fca6389507a4dddd54fc51ecb2dbe"><div class="ttname"><a href="classTransformation.html#a960fca6389507a4dddd54fc51ecb2dbe">Transformation::applyGaussianAdditiveNoise</a></div><div class="ttdeci">static void applyGaussianAdditiveNoise(const cv::Mat &amp;image, float variance, cv::Mat &amp;noisy_image)</div><div class="ttdoc">Add Gaussian additive noise to image with the given variance on all channels. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:40</div></div>
<div class="ttc" id="classTransformation_html"><div class="ttname"><a href="classTransformation.html">Transformation</a></div><div class="ttdoc">Utility class for image and ground truth transofmrations. </div><div class="ttdef"><b>Definition:</b> transformation.h:40</div></div>
<div class="ttc" id="classTransformation_html_a850d04c10ed94bb8d7c82e3fe41e22f1"><div class="ttname"><a href="classTransformation.html#a850d04c10ed94bb8d7c82e3fe41e22f1">Transformation::applyVerticalShear</a></div><div class="ttdeci">static void applyVerticalShear(const cv::Mat &amp;image, int crop, float shear, cv::Mat &amp;sheared_image)</div><div class="ttdoc">Apply vertical shear. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:266</div></div>
<div class="ttc" id="classTransformation_html_a1feaf4e4c77f3fc0786181bef5f31674"><div class="ttname"><a href="classTransformation.html#a1feaf4e4c77f3fc0786181bef5f31674">Transformation::applySaltAndPepperNoise</a></div><div class="ttdeci">static void applySaltAndPepperNoise(const cv::Mat &amp;image, float p, cv::Mat &amp;noisy_image)</div><div class="ttdoc">Add salt and pepper noise. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:113</div></div>
<div class="ttc" id="classTransformation_html_ac08f5ac7e3c9f3f050a8de33e6c463c6"><div class="ttname"><a href="classTransformation.html#ac08f5ac7e3c9f3f050a8de33e6c463c6">Transformation::applyPoissonNoise</a></div><div class="ttdeci">static void applyPoissonNoise(const cv::Mat &amp;image, cv::Mat &amp;noisy_image)</div><div class="ttdoc">Add poisson noise. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:150</div></div>
<div class="ttc" id="classTransformation_html_a3cf1af7736867a7e9f056dec13f1ac56"><div class="ttname"><a href="classTransformation.html#a3cf1af7736867a7e9f056dec13f1ac56">Transformation::applyMotionBlur</a></div><div class="ttdeci">static void applyMotionBlur(const cv::Mat &amp;image, int size, float angle, cv::Mat &amp;blurred_image)</div><div class="ttdoc">Apply motion blur. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:225</div></div>
<div class="ttc" id="classTransformation_html_a54b67208b52267e70c1c3a83122e2f79"><div class="ttname"><a href="classTransformation.html#a54b67208b52267e70c1c3a83122e2f79">Transformation::applyMedianBlur</a></div><div class="ttdeci">static void applyMedianBlur(const cv::Mat &amp;image, int size, cv::Mat &amp;blurred_image)</div><div class="ttdoc">Apply median filter. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:204</div></div>
<div class="ttc" id="classTransformation_html_ae51215c44b8a132a2da0eee215691c99"><div class="ttname"><a href="classTransformation.html#ae51215c44b8a132a2da0eee215691c99">Transformation::applyTranslation</a></div><div class="ttdeci">static void applyTranslation(const cv::Mat &amp;image, int crop, int translation_x, int translation_y, cv::Mat &amp;translated_image)</div><div class="ttdoc">Apply translation. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:345</div></div>
<div class="ttc" id="classTransformation_html_a2f7e3614b6d159825bc39f33367a8c47"><div class="ttname"><a href="classTransformation.html#a2f7e3614b6d159825bc39f33367a8c47">Transformation::applyGaussianSamplingErrors</a></div><div class="ttdeci">static void applyGaussianSamplingErrors(const cv::Mat &amp;image, float variance, cv::Mat &amp;noisy_image)</div><div class="ttdoc">Add Gaussian sampling errors with given variance. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:69</div></div>
<div class="ttc" id="classTransformation_html_a34ca4d06b735987696527bddf11e675d"><div class="ttname"><a href="classTransformation.html#a34ca4d06b735987696527bddf11e675d">Transformation::applyGaussianBlur</a></div><div class="ttdeci">static void applyGaussianBlur(const cv::Mat &amp;image, int size, float sigma_x, float sigma_y, cv::Mat &amp;blurred_image)</div><div class="ttdoc">Apply Gaussian blurring. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:191</div></div>
<div class="ttc" id="classTransformation_html_aa313a9c5b15baafeabc62c9091d84d89"><div class="ttname"><a href="classTransformation.html#aa313a9c5b15baafeabc62c9091d84d89">Transformation::applyHorizontalShear</a></div><div class="ttdeci">static void applyHorizontalShear(const cv::Mat &amp;image, int crop, float shear, cv::Mat &amp;sheared_image)</div><div class="ttdoc">Apply horizontal shear. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:289</div></div>
<div class="ttc" id="classTransformation_html_a2d4c1c435f84810901c2177d36fa11b7"><div class="ttname"><a href="classTransformation.html#a2d4c1c435f84810901c2177d36fa11b7">Transformation::applyBilateralFilter</a></div><div class="ttdeci">static void applyBilateralFilter(const cv::Mat &amp;image, int size, float sigma_color, float sigma_space, cv::Mat &amp;filtered_image)</div><div class="ttdoc">Apply bilateral filter. </div><div class="ttdef"><b>Definition:</b> transformation.cpp:215</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 16 2017 16:39:17 for Superpixel Benchmark by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
